package com.ims.core.doc.service.impl;

import java.util.List;
import com.ims.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ims.core.doc.mapper.TSalInvoiceRedConfirmMapper;
import com.ims.core.doc.domain.TSalInvoiceRedConfirm;
import com.ims.core.doc.service.ITSalInvoiceRedConfirmService;

/**
 * 红字确认返回Service业务层处理
 *
 * @author IMS
 * @date 2024-10-28
 */
@Service
public class TSalInvoiceRedConfirmServiceImpl implements ITSalInvoiceRedConfirmService
{
    @Autowired
    private TSalInvoiceRedConfirmMapper tSalInvoiceRedConfirmMapper;

    /**
     * 查询红字确认返回
     *
     * @param id 红字确认返回主键
     * @return 红字确认返回
     */
    @Override
    public TSalInvoiceRedConfirm selectTSalInvoiceRedConfirmById(Long id)
    {
        return tSalInvoiceRedConfirmMapper.selectTSalInvoiceRedConfirmById(id);
    }

    /**
     * 查询红字确认返回列表
     *
     * @param tSalInvoiceRedConfirm 红字确认返回
     * @return 红字确认返回
     */
    @Override
    public List<TSalInvoiceRedConfirm> selectTSalInvoiceRedConfirmList(TSalInvoiceRedConfirm tSalInvoiceRedConfirm)
    {
        return tSalInvoiceRedConfirmMapper.selectTSalInvoiceRedConfirmList(tSalInvoiceRedConfirm);
    }

    /**
     * 新增红字确认返回
     *
     * @param tSalInvoiceRedConfirm 红字确认返回
     * @return 结果
     */
    @Override
    public int insertTSalInvoiceRedConfirm(TSalInvoiceRedConfirm tSalInvoiceRedConfirm)
    {
        tSalInvoiceRedConfirm.setCreateTime(DateUtils.getNowDate());
        return tSalInvoiceRedConfirmMapper.insertTSalInvoiceRedConfirm(tSalInvoiceRedConfirm);
    }

    /**
     * 修改红字确认返回
     *
     * @param tSalInvoiceRedConfirm 红字确认返回
     * @return 结果
     */
    @Override
    public int updateTSalInvoiceRedConfirm(TSalInvoiceRedConfirm tSalInvoiceRedConfirm)
    {
        tSalInvoiceRedConfirm.setUpdateTime(DateUtils.getNowDate());
        return tSalInvoiceRedConfirmMapper.updateTSalInvoiceRedConfirm(tSalInvoiceRedConfirm);
    }

    /**
     * 批量删除红字确认返回
     *
     * @param ids 需要删除的红字确认返回主键
     * @return 结果
     */
    @Override
    public int deleteTSalInvoiceRedConfirmByIds(Long[] ids)
    {
        return tSalInvoiceRedConfirmMapper.deleteTSalInvoiceRedConfirmByIds(ids);
    }

    /**
     * 删除红字确认返回信息
     *
     * @param id 红字确认返回主键
     * @return 结果
     */
    @Override
    public int deleteTSalInvoiceRedConfirmById(Long id)
    {
        return tSalInvoiceRedConfirmMapper.deleteTSalInvoiceRedConfirmById(id);
    }
}
